Use the following code as an example of how to use the PEGetNGroups to get the number of groups in a report:
LOCAL nNumGroups
nNumGroups = PEGetNGroups(Job)
IF nNumGroups < 0
&& Handle error
ENDIF
You can use code similar to the following to change the condition for a group field in your report using PESetGroupCondition:
LOCAL SectionCode, ConditionField, Condition, SortDirection
SectionCode = PE_GROUPFOOTER
&& Indicates the Group Footer Section
ConditionField = "{ALIAS.TABLE->BOOLFIELD}"
Condition = PE_GC_TOYES
SortDirection = PE_SF_ASCENDING
IF PESetGroupCondition (Job, SectionCode, ConditionField,;
Condition, SortDirection) = .F.
&& Handle error
ENDIF
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |